<center>
    <div id="isi">
        <div class="contentIsi">
            <?php $this->load->view('panel_samping') ?>
            <div class="isi">
                <?php if($num==0){ ?>
                    <div class="news">
                        Belum ada berita yang dibuat
                    </div>
                <?php }else{ ?>    
                    <?php for ($i = 0; $i < count($news); $i++) { ?>
                        <div class="news">
                            <h1><a href="<?php echo base_url() ?>home/view_berita/<?php echo $news[$i]['idberita'] ?>"><?php echo $news[$i]['judul'] ?></a></h1>
                            <h2>Oleh <?php echo $news[$i]['pembuat'] ?> </h2>
                            <?php echo substr($news[$i]['more'], 0, 150) . '...' ?>
                        </div>

                    <?php } ?>
                <?php } ?>
                <center>
                    <div class="pagination">
                        <?php
                        for ($i = 1; $i <= $num; $i++) {
                            if ($i == $page)
                                echo '<a class="current" href=' . base_url() . 'home/list_news/' . $i . '>' . $i . '&nbsp;&nbsp;</a>';
                            else
                                echo '<a href=' . base_url() . 'home/list_news/' . $i . '>' . $i . '&nbsp;&nbsp;</a>';
                        }
                        ?>
                    </div>
                </center>
            </div>
            <?php $this->load->view('panel_kanan') ?>
        </div>

    </div>
</center>
